package com.turing.post.antimoney.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

@Remote
@Local
public interface AlarmRuleDao {
	/**
	 * 预警规则插入
	 * 
	 * @param ar
	 *            预警规则
	 * @throws PCPSApplicationException
	 *             异常信息
	 */
	public void insert(AlarmRule ar) throws PCPSApplicationException;

	/**
	 * 预警规则修改
	 * 
	 * @param ar
	 *            预警规则
	 * @throws PCPSApplicationException
	 *             异常信息
	 */
	public void update(AlarmRule ar) throws PCPSApplicationException;

	/**
	 * 根据主键查询预警规则
	 * 
	 * @param id
	 * @return
	 * @throws PCPSApplicationException
	 */
	public AlarmRule getAlarmRuleById(BigInteger id);

	/**
	 * 查询指定发卡商定义的预警规则
	 * 
	 * @param issueCompanyNo
	 * @return
	 */
	public List<AlarmRule> getAllAlarmRuleByIssueCompanyNo(String issceCompanyNo);

	/**
	 * 条件查询预警规则
	 * 
	 * @param issueCompanyNo
	 *            发卡商编号
	 * @param alarmruletype
	 *            规则类型
	 * @param status
	 *            状态
	 * @param alarmRuleDesc
	 *            规则描述
	 * @param pageNo
	 *            页码
	 * @return
	 */
	public List<AlarmRule> getAlarmRuleByCondition(PCPSWebInput webInput,
			String alarmruletype, String status, String alarmRuleDesc,
			Integer pageNo);

	/**
	 * 条件查询预警规则总数
	 * 
	 * @param issueCompanyNo
	 *            发卡商编号
	 * @param alarmruletype
	 *            规则类型
	 * @param status
	 *            状态
	 * @param alarmRuleDesc
	 *            规则描述
	 * @return
	 */
	public Integer getAlarmRuleCountByCondition(PCPSWebInput webInput,
			String alarmruletype, String status, String alarmRuleDesc);

	/**
	 * @return
	 */
	public BigInteger getMaxOperId();

}